#define DEBUG 0

// --------------------SCARA--------------------//

#define SCARA_PEGA_BLOCO	'a'
#define SCARA_DEIXA_BLOCO	'b'
#define SCARA_DESCE_EF		'c'
#define SCARA_SOBE_EF		'd'
#define SCARA_SOBE_EF_ATE_TOKE	'e'
#define SCARA_DESCE_EF_ATE_TOKE	'n'
#define SCARA_DETACH_SERVOS	'o'


#define ATE_TOKE -1


// --------------------OMNI--------------------//

#define OMNI_FWD		'f'
#define OMNI_REV		'g'
#define OMNI_DIR		'h'
#define OMNI_ESQ		'i'
#define OMNI_CW			'j'
#define OMNI_CCW		'k'
#define LE_SENSORES		'l'
#define OMNI_ALINHA_IR		'm'	


#define IR_FD			1
#define IR_FE			2
#define IR_TD			3
#define IR_TE			4
#define IR_MD			5
#define IR_ME			6

#define THRESHOLD_IR_FD		(43+51)/2
#define THRESHOLD_IR_FE		(49+179)/2
#define THRESHOLD_IR_TD		(47+95)/2
#define THRESHOLD_IR_TE		(45+58)/2
#define THRESHOLD_IR_MD		(48+97)/2
#define THRESHOLD_IR_ME		(247+496)/2

#define FWD  1
#define REV  2
#define OFF  3

#define FRENTE  1
#define TRAS    2
#define LAT_DIR 3
#define LAT_ESQ 4
#define MEIO	5
#define MEIO_DIR 6
#define MEIO_ESQ 7

#define EXTERNO 0
#define INTERNO 1